home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18238 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: yama.mcc.ac.uk!dmu!usenet
  2. From: Graham Perkins <grp@dmu.ac.uk>
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Date: Fri, 19 Apr 1996 16:35:24 +0100
  6. Organization: De Montfort University
  7. Message-ID: <3177B2BC.482B@dmu.ac.uk>
  8. References: <BLUME.96Apr16103345@zayin.cs.princeton.edu> <4l3vu1$imr@newsbf02.news.aol.com> <BLUME.96Apr18104240@zayin.cs.princeton.edu>
  9. NNTP-Posting-Host: mkcsst22.mk.dmu.ac.uk
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win16; I)
  14.  
  15. Matthias Blume wrote:
  16. > You understood me right -- I do not believe in OOP, and I won't defend
  17. > it.  However, there is a middle ground, which is called `subtyping'.
  18.  
  19. Genuine subtyping is not middle ground, but an extreme.  A type denotes a
  20. set of items.  A subtype denotes a subset of those items.  A subtype cannot be
  21. used as a polymorphic stand-in in a programming scenario unless
  22. all the operators of the main type are defined on the subset, and the subset
  23. is closed with respect to those operations.
  24.  
  25. Trivially, NATURAL cannot be considered a subtype of INTEGER, nor FLOAT a
  26. subtype of DOUBLE.  More importantly, most subclassing you find in yer average
  27. Smalltalk, C++, Eiffel, Java etc library is not genuine subtyping.
  28.  
  29. IMHO Matthias is being a little too idealistic.  Formal strictness is useful
  30. and generally not practised as wide as it should but software development
  31. also require pragmatism, and relaxing the notion of "subtype" yields a great
  32. deal of productivity potential without damaging static correctness too much.
  33.  
  34. -- 
  35. person: Graham Perkins         paper: School of Computing
  36. voice:  +44 (0)1908 834936            De Montfort University
  37. dots:   +44 (0)1908 834948            Milton Keynes MK7 6HP
  38. bits:   grp@dmu.ac.uk                 United Kingdom
  39.